
<!--
 * @Author: cgl
 * @Date: 2023-04-18 15:12:26
 * @LastEditors: cgl
 * @LastEditTime: 2023-08-16 16:39:10
 * @FilePath: \public-health-emergencies-fed:\radiation-hygiene-fe\src\views\table.vue
 * @Description: 短连接的查看页面 可在手机端或pc端 免登录 路由：/table
 *
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved.
-->
<template>
  <div class="app-container" :class="bIsAndroid && 'moblie-app'">

		<!-- {{ info }}{{ bIsAndroid }} -->
		<div v-if="bIsAndroid" class="moblie-title">
			<img class="moblieimage" :src="titleimage" alt="">
    </div>

		<div class="top-bar" v-else>
			<div class="top-bar-left">
				<div class="titlecontainer">
					<img class="titleimage" :src="titleimage" alt="">
				</div>
			</div>
			<div class="top-bar-middle">
				<div></div>
				<!-- <div class="top-bar-middle-title">放射卫生检测与评价管理系统</div> -->
			</div>
		</div>



		<div v-if="!isEmpty">
			<el-tabs v-model="activeName" @tab-click="changeTab">
				<el-tab-pane v-for="(item, index) in tabList" :key="index"
					:label="item.personnelName"
					:name="item.personnelId">
				</el-tab-pane>
			</el-tabs>

			<!-- <div v-if="activeName != null && activeName != '-1'" :style="`background: #fff; height: ${height - 335}px !important; overflow: auto;`"> -->
			<div class="content" v-if="activeName != null && activeName != '-1'" >

				<div class="ttitle">职业外照射个人监测</div>
				<div class="ttitle">达到调查水平剂量核查登记表</div>

				<div class="info flex">
					<span>{{dataForm.entrustOrganizationName}}</span> <span>编号：{{form.personnelNumber}}</span>
				</div>

				<div class="devider"></div>

				<div class="line flex">
					<span>人员姓名： {{form.personnelName}}</span> <span>职业类别：
						<!-- <dict-tag
							class="dicttag"
							:value="form.occupationalClassification"
							:options="dict.type.occupational_classification"
						></dict-tag> -->
						<!-- {{occupationalArr.find(item => item.dictValue == form.occupationalClassification).dictLabel}} -->
						{{form.occupationalName}}
					</span>
				</div>

				<!-- 未穿戴 -->
				<div class="line" v-if="form.wearLeadCoat == '0'">
					<span>本次测量剂量值： {{form.doseEquivalent}}mSv</span>
				</div>

				<!-- 穿戴 -->
				<div class="line" v-if="form.wearLeadCoat == '1'">
					<span>本次测量剂量值： 铅衣内：{{form.doseWithin}}mSv <span class="blank"></span> 铅衣外：{{form.doseOutside}}mSv</span>
				</div>
				<div class="line locate" v-if="form.wearLeadCoat == '1'">
					<span>本周期本人是否佩戴有甲状腺屏蔽：</span>
					<el-radio-group v-model="form.thyroidShielding">
						<el-radio :label="1">有</el-radio>
						<el-radio :label="0">无</el-radio>
					</el-radio-group>
				</div>

				<div class="line">
					<span>剂量计佩戴起止日期： {{dataForm.wearingBeginTime}} 至 {{dataForm.wearingEndTime}}</span>
				</div>

				<div class="line locate">
					<span>个人剂量计佩戴位置：</span>
					<el-radio-group v-model="form.wearPosition" @change="handleCheckedLocatedChange">
						<el-radio :label="1">胸部</el-radio>
						<el-radio :label="2">头部</el-radio>
						<el-radio :label="3">手部</el-radio>
						<el-radio :label="4">其他部位</el-radio>
					</el-radio-group>
				</div>

				<div class="line situate">
					<span class="stitle">请确定在佩戴个人剂量计期间，是否发生过以下情况：</span>
					<el-checkbox-group v-model="form.checkedsituate" @change="handleCheckedSituateChange">
						<el-checkbox :label="0">1.个人剂量计曾经被打开</el-checkbox>
						<el-checkbox :label="1">2.个人剂量计曾经被水浸泡</el-checkbox>
						<el-checkbox :label="2">3.个人剂量计曾经被留置于放射工作场所内</el-checkbox>
						<el-checkbox :label="3">4.曾经佩戴个人剂量计接受过放射性检查</el-checkbox>
						<el-checkbox :label="4">5.曾经佩戴个人剂量计扶持接受放射性检查的受检者/患者</el-checkbox>
						<el-checkbox :label="5">6.曾经维修含源装置</el-checkbox>
						<el-checkbox :label="6">7.铅围裙内外剂量计混淆佩戴</el-checkbox>
					</el-checkbox-group>
				</div>

				<div class="line situate normal">
					<span>如果是正常佩戴，是否发生过以下情况：</span>
					<el-checkbox-group v-model="form.checkednormal" @change="handleCheckedNormalChange">
						<el-checkbox :label="7">8.佩戴期间工作量较前期明显增加</el-checkbox>
						<el-checkbox :label="8">9.其他原因：</el-checkbox>
						<!-- <el-input
							type="textarea"
							rows="3"
							v-model="form.remarks"
							placeholder="请输入"
							clearable
						/> -->
						<el-input
							v-model="form.other"
							:disabled="form.checkednormal && form.checkednormal.indexOf(8) == '-1'"
							placeholder="请输入"
							size="mini"
							clearable
						/>
					</el-checkbox-group>
				</div>

			</div>

			<!-- <div v-if="activeName == '-1'" :style="`background: #fff; height: ${height - 350}px !important; overflow: auto;`"> -->
			<div class="content" v-if="activeName == '-1'">

				<div class="ttitle">职业外照射个人监测</div>
				<div class="ttitle">剂量计情况说明</div>

				<div class="info flex">
					<span>{{dataForm.entrustOrganizationName}}</span>
				</div>

				<div class="devider"></div>

				<div class="line">
					<span>剂量计佩戴起止日期： {{dataForm.wearingBeginTime}} 至 {{dataForm.wearingEndTime}}</span>
				</div>

				<!-- <div class="line situate normal"> -->
					<div class="line">请确定剂量计是否发生过以下情况：</div>
					<div class="line">1.个人剂量计丢失。</div>
					<div class="line">2.个人剂量计回寄超过规定时间。</div>
					<div class="line">3.按规定时间寄出。</div>
					<div class="line borderline">4.其他原因。</div>

					<!-- <el-radio-group class="lostRadio" v-model="form.a" @change="handlelostRadioChange">
						<el-radio :label="0">1.个人剂量计丢失。</el-radio>
						<el-radio :label="1">2.个人剂量计回寄超过规定时间。</el-radio>
						<el-radio :label="2">3.按规定时间寄出。</el-radio>
						<el-radio :label="3">4.其他原因。</el-radio>
						<el-input
							v-model="form.other"
							:disabled="form.a != '3'"
							placeholder="请输入"
							size="mini"
							clearable
						/>
					</el-radio-group> -->
				<!-- </div> -->

				<div class="line appendix">
					<span>附人员表：</span>
				</div>

				<el-table class="losttable" :data="dataForm.lost" size="mini" :height="height - 729 + 'px'" border>
					<el-table-column label="姓名" align="center" prop="personnelName" width="200"/>
					<el-table-column label="剂量计发生情况" align="center">
						<template slot-scope="{row}">
							<el-select
								v-model="row.description"
								style="width: 100%"
								size="mini">
								<el-option
									:label="item.label"
									:value="item.label"
									v-for="(item,index) in lostsituationList"
									:key="index">
								</el-option>
							</el-select>
						</template>
					</el-table-column>
				</el-table>
			</div>

			<div class="opration">
				<el-button class="botbuttom" type="primary" size="small" @click="handledownload()">下载</el-button>
				<el-upload
					class="myupload"
					ref="upload"
					:action="upload.url"
					:on-remove="handleRemove"
					:on-success="handleFileSuccessSecond"
					:before-upload="beforeAvatarUpload"
					:file-list="form.fileList"
					:limit="1"
					accept=".pdf"
					:on-exceed="handleExceed"
					multiple>
					<el-button class="botbuttom" type="primary" size="small">上传</el-button>
				</el-upload>
			</div>
			<div class="submit-container">
				<el-button class="botbuttom submit" type="primary" size="small" @click="submitForm()">提交</el-button>
			</div>
		</div>


		<div class="isEmpty" v-else>
			<span>暂无人员信息</span>
		</div>

	</div>
</template>

<script>

import { exceptionalRecordDetailsPage, exceptionalRecordDetailsIInfo, uploadHandleFile, updateHandle,
	exceptionalRecordDetailsUpload, exceptionalQueryPageList, exceptionalSendSMS, downloadLargeDose,
	downloadLost, getOccupational } from "@/api/slides/abnormal";
import { getToken } from "@/utils/auth";
import { mapGetters } from "vuex";
import {downloadJson} from "@/utils/request";
import titleimage from "@/assets/images/title-image.png";

export default {
  name: "User",
  data() {
    return {
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
				state: '0',
      },
			total: 0,
			dialogVisible: false,
			loading: false,
			status: null,
			title: null,
      rules: {
        entrustOrganizationId: [
          { required: true, message: "单位名称不能为空", trigger: "change" },
        ],
      },
      // 用户导入参数
      upload: {
        // 是否显示弹出层（用户导入）
        open: false,
        // 弹出层标题（用户导入）
        title: "",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: {
          Authorization: "Bearer " + getToken(),
          'Content-Disposition': 'inline'
        },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/system/oss/upload"
      },
			// 视图高度
      height: document.documentElement.clientHeight,
			// 合同列表
			contractList: [],
			// 委托单位下拉框
			entrustOrganizationSelect: [],
			// 设备类型下拉框
			entrustEquipmentTypeSelect: [],
			// 检测类型下拉框
			inspectionList: [],
			CGInspectList: [],
			FHInspectList: [],
			radioInspectList: [],
			// 省列表
			provinceList: [],
			// 市列表
			cityList: [],
			// 区县列表
			areaList: [],
			// 合计
			totalprice: 0,

			wearPosition: null,
			checkedsituate: [],
			checkednormal: [],
			checkList: [
				"opened",
				"soakedWater",
				"inRadiationSite",
				"acceptRadiationCheck",
				"helpRadiationPersonnel",
				"repairEquipment",
				"confusedUse",
				"increasedWorkload",
			],
			form: {
				checkedsituate: [],
				checkednormal: [],
			},
			iswear: false,
			// 请求的总表单
			dataForm: {},
			// 请求的人员列表（tab栏）
			tabList: [],
			// // 剂量计缺失列表
			// lostList: [],
			activeName: null,
			// 上传的文件列表
			fileList: [],
			// 剂量计缺失情况下拉列表
			lostsituationList: [
				{
					label: "个人剂量计丢失",
					value: "1",
				},
				{
					label: "其他原因",
					value: "2",
				}
			],
			titleimage: titleimage,
			// 职业分类字典
			occupationalArr: [],
			//
			info: null,
			bIsAndroid: null,
			// 无人员信息
			isEmpty: true,
    };
  },
  computed: {
    ...mapGetters(["device"]),
  },
  created() {
			console.log("请求参数", this.$route.query);
			this.info = navigator.userAgent.toLowerCase();
			console.log("navigator.userAgent", navigator.userAgent);
			this.bIsAndroid = this.info.match(/android/i) == "android";

			if(!this.$route.query.exceptionalRecordId) {
				return;
			}
			// this.lostList = [
				// {
				// 	personnelName: "111",
				// 	description: "222222222",
				// },
				// {
				// 	personnelName: "222",
				// 	description: "333333333",

				// },
				// {
				// 	personnelName: "222",
				// 	description: "333333333",

				// },
				// {
				// 	personnelName: "222",
				// 	description: "333333333",

				// },
				// {
				// 	personnelName: "222",
				// 	description: "333333333",

				// },
				// {
				// 	personnelName: "222",
				// 	description: "333333333",

				// },
				// {
				// 	personnelName: "222",
				// 	description: "333333333",

				// },
			// ];

		// 获取职业分类字典
		getOccupational().then((response) => {
			this.occupationalArr = response.data;
		});
		exceptionalRecordDetailsIInfo(this.$route.query.exceptionalRecordId).then((response) => {
		// exceptionalRecordDetailsIInfo("1665552302762799105").then((response) => {
		// exceptionalRecordDetailsIInfo("1665971954457980930").then((response) => { /* 缺失 */
			console.log("thenthenthen", response);
			this.dataForm = response.data;
			if ((this.dataForm.largeDose && this.dataForm.largeDose.length != 0) || (this.dataForm.lost && this.dataForm.lost.length != 0)) {
				this.isEmpty = false;
			}else { /* 无人员信息 */
				this.isEmpty = true;
				return;
			}
			this.dataForm.wearingBeginTime = this.parseTime(new Date(this.dataForm.wearingBeginTime), "{y}年{m}月{d}日");
			this.dataForm.wearingEndTime = this.parseTime(new Date(this.dataForm.wearingEndTime), "{y}年{m}月{d}日");
			this.tabList = this.dataForm.largeDose.map(item => {
				return {
					personnelName: item.personnelName,
					personnelId: item.personnelId
				}
			});
			if (this.dataForm.lost && this.dataForm.lost.length != 0) {
				this.tabList.push({ personnelName: "剂量计缺失", personnelId: "-1" })
			}

			this.activeName = this.tabList[0].personnelId;
			// console.log("获取的人员tab栏", this.tabList, this.activeName);
			this.changeTab({name: this.activeName});

		}).catch((response) => {
			console.log("catchcatchcatch", response);
				this.isEmpty = true;

		});
  },
  methods: {
		// 切换tab栏
		changeTab(tab, event) {
			console.log("切换tab栏", tab, event);
			if(tab.name == "-1") { /* 剂量计缺失 */
				if (!this.dataForm.fileList) {
					this.$set(this.dataForm, "fileList", [])
				}
				this.form = this.dataForm;
				return;
			}else {
				let findlargeDoseForm =  this.dataForm.largeDose.find(item => item.personnelId == tab.name);
				// let findlostForm =  this.dataForm.lost.find(item => item.personnelId == tab.name);
				if(findlargeDoseForm) {
					this.form = findlargeDoseForm;
					this.$set(this.form, "checkedsituate", [])
					this.$set(this.form, "checkednormal", [])
					if (!this.form.fileList) {
						this.$set(this.form, "fileList", [])
					}
					let find = this.occupationalArr.find(item => item.dictValue == this.form.occupationalClassification);
					if (find) {
						this.$set(this.form, "occupationalName", find.dictLabel)
					}
					// this.form.checkedsituate = [];
					// this.form.checkednormal = [];
					this.checkList.forEach((prop, index) => {
						if (prop == "increasedWorkload") {
							this.form[prop] == 1 ? this.form.checkednormal.push(index) : "";
						}
						this.form[prop] == 1 ? this.form.checkedsituate.push(index) : "";
					})
					this.form.other ? this.form.checkednormal.push("9") : "";
					// this.form.islargeDose = true;
					console.log("找到了大剂量", this.form);
					// this.wearPosition = null;
					// this.checkedsituate = [];
					// this.checkednormal = [];
				}else {
					console.log("没找到大剂量");
				}
			}

		},
		// 更改个人剂量计佩戴位置
    handleCheckedLocatedChange(val, a) {
			console.log("更改个人剂量计佩戴位置", val, a);
			console.log("this.wearPosition", this.form.wearPosition);
    },
		// 更改情况
    handleCheckedSituateChange(val, a) {
			console.log("更改情况", val, a);
			console.log("this.checkedsituate", this.form.checkedsituate);
			this.setValue();
    },
		// 更改正常
    handleCheckedNormalChange(val, a) {
			console.log("更改正常", val, a);
			console.log("this.form.checkednormal", this.form.checkednormal);
			this.setValue();
    },
		// // 更改缺失情况
    // handlelostRadioChange(val, a) {
		// 	console.log("更改缺失情况", val, a);
		// 	console.log("this.form.a", this.form.a);
    // },
		// 赋值
		setValue() {
			this.form.opened = 0;
			this.form.soakedWater = 0;
			this.form.inRadiationSite = 0;
			this.form.acceptRadiationCheck = 0;
			this.form.helpRadiationPersonnel = 0;
			this.form.repairEquipment = 0;
			this.form.confusedUse = 0;
			this.form.increasedWorkload = 0;
			console.log("this.form.checkedsituate", this.form.checkedsituate);
			console.log("this.form.checkednormal", this.form.checkednormal);
			this.form.checkedsituate.forEach(item => {
				let prop = this.checkList[item];
				this.form[prop] = 1;
			})
			this.form.checkednormal.forEach(item => {
				if (item == "7") {
					let prop = this.checkList[item];
					this.form[prop] = 1;
				}
			})

		},
		// 下载
		handledownload() {
			if (this.activeName != "-1") {
			// if (false) {
				if (this.form.checkedsituate.length == 0
						&& this.form.checkednormal.indexOf(7) == -1) {
					if(this.form.checkednormal.indexOf(8) == -1) { /* 没勾 */
						this.$modal.msgWarning("请勾选至少一项");
						return;
					}else if(!this.form.other) { /* 勾了没输 */
						this.$modal.msgWarning("请输入其他原因");
						return;
					}
				}
				if (!this.form.wearPosition) {
					this.$modal.msgWarning("佩戴位置不能为空");
					return;
				}
				// this.setValue();
				this.form.wearingBeginTime = this.dataForm.wearingBeginTime;
				this.form.wearingEndTime = this.dataForm.wearingEndTime;
				console.log("收集后form", this.form);
				// downloadLargeDose(this.form).then(res => {
				// 	this.$modal.msgSuccess("操作成功");
				// 	console.log("res", res);
				// 	const aLink = document.createElement('a')
				// 	var blob = new Blob([res], { type: "" })
				// 	var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
				// 	// var contentDisposition = decodeURI(res.headers['content-disposition'])
				// 	// var result = patt.exec(contentDisposition)
				// 	// var fileName = result[1]
				// 	// fileName = fileName.replace(/\"/g, '')
				// 	aLink.href = URL.createObjectURL(blob)
				// 	aLink.setAttribute('download', "fileName.docx") // 设置下载文件名称
				// 	document.body.appendChild(aLink)
				// 	aLink.click()
				// 	document.body.appendChild(aLink)

				// })

				this.download('/biz/exceptional/record/downloadLargeDose', this.form, `外照射达到调查水平剂量核查登记表(${this.form.personnelName}).doc`)
			}else {
				let form = {
					entrustName: this.dataForm.entrustOrganizationName,
					wearingBeginTime: this.dataForm.wearingBeginTime,
					wearingEndTime: this.dataForm.wearingEndTime,
					user: [],
				}
				let isEmpty = false;
				form.user = this.dataForm.lost.map(item => {
					if (!item.description) {
						isEmpty = true;
					}
					return {
						name: item.personnelName,
						describe: item.description,
						exceptionalRecordDetailsId: item.exceptionalRecordDetailsId,
					}
				});
				console.log("收集后form", form);
				if (isEmpty) {
					this.$modal.msgWarning("剂量计发生情况不能为空");
					return;
				}
				// downloadLost(form).then(response => {
				// 	this.$modal.msgSuccess("操作成功");
				// })
				downloadJson('/biz/exceptional/record/downloadLost', form, `剂量计缺失情况说明(${this.dataForm.entrustOrganizationName}).doc`)

			}
		},
    // 最后提交
    submitForm() {
			// if (this.form.fileList.length == 0) {
			// 	this.$modal.msgWarning("请先上传文件");
			// 	return;
			// }
			if (this.activeName != "-1") {
			// if (false) {
				if (this.form.checkedsituate.length == 0
						&& this.form.checkednormal.indexOf(7) == -1) {
					if(this.form.checkednormal.indexOf(8) == -1) { /* 没勾 */
						this.$modal.msgWarning("请勾选至少一项");
						return;
					}else if(!this.form.other) { /* 勾了没输 */
						this.$modal.msgWarning("请输入其他原因");
						return;
					}
				}
				if (!this.form.wearPosition) {
					this.$modal.msgWarning("佩戴位置不能为空");
					return;
				}
				// this.form.opened = 0;
				// this.form.soakedWater = 0;
				// this.form.inRadiationSite = 0;
				// this.form.acceptRadiationCheck = 0;
				// this.form.helpRadiationPersonnel = 0;
				// this.form.repairEquipment = 0;
				// this.form.confusedUse = 0;
				// this.form.increasedWorkload = 0;
				// console.log("this.checkedsituate", this.checkedsituate);
				// console.log("this.checkednormal", this.checkednormal);
				// this.checkedsituate.forEach(item => {
				// 	let prop = this.checkList[item];
				// 	this.form[prop] = 1;
				// })
				// this.checkednormal.forEach(item => {
				// 	if (item == "7") {
				// 		let prop = this.checkList[item];
				// 		this.form[prop] = 1;
				// 	}
				// })
				this.form.wearingBeginTime = this.dataForm.wearingBeginTime;
				this.form.wearingEndTime = this.dataForm.wearingEndTime;
				console.log("收集后form", this.form);
				updateHandle(this.form).then(response => {
					this.$modal.msgSuccess("提交成功");

				})
			}else {
				let form = {
					// entrustName: this.dataForm.entrustOrganizationName,
					// wearingBeginTime: this.dataForm.wearingBeginTime,
					// wearingEndTime: this.dataForm.wearingEndTime,
					exceptionType: 1,
					exceptionalRecordId: this.dataForm.lost[0].exceptionalRecordId,
					userList: [],
				}
				let isEmpty = false;
				form.userList = this.dataForm.lost.map(item => {
					if (!item.description) {
						isEmpty = true;
					}
					return {
						name: item.personnelName,
						describe: item.description,
						exceptionalRecordDetailsId: item.exceptionalRecordDetailsId,
					}
				});
				console.log("收集后form", form);
				if (isEmpty) {
					this.$modal.msgWarning("剂量计发生情况不能为空");
					return;
				}
				updateHandle(form).then(response => {
					this.$modal.msgSuccess("提交成功");

				})
			}

    },
		// 文件移除
		handleRemove(file, fileList) {
			console.log("handleRemove", fileList);
			this.form.fileList = fileList;
		},
    // 文件上传成功处理
    handleFileSuccessSecond(response, file, fileList) {
			console.log("response, file, fileList", response, file, fileList);
			// this.fileList = fileList;
			// this.fileList.map(item => {
			// 	if (item.response) { /* 新添加的图片 */
			// 		item.ossId = item.response.data && item.response.data.ossId;
			// 	}
			// });
			// console.log("this.fileList", this.fileList);
			// this.imageUrlS = URL.createObjectURL(file.raw);
			// this.form.agreementFileOssId =  response.data && response.data.ossId;
			// if (response.data) {
			// 	this.ossIdList.push(response.data.ossId);
			// }
			if (response.code == 500) {
				this.$modal.msgWarning(response.msg);
				this.$refs.upload.clearFiles();
			}else {
				this.form.fileList = fileList;
				if (response.data && response.data.ossId) {
					let form = {
						exceptionType: this.activeName == "-1" ? 1 : 2,
						ossId: response.data.ossId,
					};
					let arr = this.dataForm.lost.map(item => item.exceptionalRecordDetailsId);
					if (this.activeName == "-1") { /* 缺失 */
						form.exceptionalRecordDetailsId = arr;
						form.exceptionalRecordId = this.dataForm.lost[0].exceptionalRecordId;
					}else { /* 大剂量 */
						form.exceptionalRecordDetailsId = [this.form.exceptionalRecordDetailsId];
						form.exceptionalRecordId = this.form.exceptionalRecordId;
					}
					uploadHandleFile(
						form
					).then(response => {
						console.log("thenthenthen", response);
						this.$modal.msgSuccess("上传成功");
					}).catch(response => {
						console.log("catchcatchcatch", response);
						this.$refs.upload.clearFiles();
					});
				}
			}
			// let standardOssId = this.fileList.map(item => {
			// 	if (item.ossId) {
			// 		return item.ossId; /* 回显的列表格式 */
			// 	}else if(item.response.data) {
			// 		return item.response.data.ossId; /* 新上传的列表格式 */
			// 	}
			// }).join(",");
			// this.$set(this.form, "standardOssId", standardOssId)
			console.log("this.form", this.form);
      this.upload.open = false;
      this.upload.isUploading = false;
      // this.$refs.upload.clearFiles();
      // this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
      // this.getList();
    },
		// 上传前
		beforeAvatarUpload(file) {
			// const isJPG = file.type === 'image/jpeg';
			// const isLt2M = file.size / 1024 / 1024 < 2;

			// if (!isJPG) {
			// 	this.$message.error('上传头像图片只能是 JPG 格式!');
			// }
			// if (!isLt2M) {
			// 	this.$message.error('上传头像图片大小不能超过 2MB!');
			// }
			// return isJPG && isLt2M;
			// try {
			// 	this.$refs.upload.clearFiles()
			// } catch (error) {

			// console.log("error", error);
			// }
			// 			catch(res => {

			// console.log("catch", res);
			// 			});
			console.log("file", file);
			let isPDF = (file.type === 'application/pdf');
			if (!isPDF) {
				this.$message.warning('仅支持pdf格式，请重新上传!');
			}
			return isPDF;
		},
		// 超出数量提示
		handleExceed(files, fileList) {
			this.$message.warning(`当前限制选择 1 个文件`);
		},
  }
};
</script>

<style lang="scss" scoped>
.ttitle {
	font-size: 18px;
	font-weight: bolder;
	text-align: center;
	line-height: 34px;
}
.info {
	// border-bottom: 1px solid #b1b1b1;
	// line-height: 43px;
	line-height: 30px;
	// margin-top: 10px;
	margin-bottom: 20px;
	font-size: 14px;
}
.flex {
	display: flex;
	justify-content: space-between;
}
.line {
	margin-bottom: 10px;
	font-size: 14px;
	word-spacing: 5px;
	.blank{
		margin-inline: 10px;
	}
}
.locate .el-radio-group {
	margin-left: 10px;
}
.situate .el-checkbox-group{
	.stitle {
		// margin-bottom: 60px;
	}
	.el-checkbox{
		display: block;
		// line-height: 30px;
		margin-bottom: 10px;
		&:nth-of-type(1) {
			margin-top: 10px;
		}
	}
}
.normal .el-checkbox-group{
	.el-checkbox:nth-last-of-type(1) {
		display: inline-block;
	}
	::v-deep .el-input {
		width: 90%;
		display: inline-block;
	}
}
// .myflex {

// 	display: flex;
// 	justify-content: space-between;
// 	align-items: center;
// }
.app-container {
	padding-top: 0px;
	position: relative;
}
::v-deep .el-tabs__nav-wrap::after {
	display: none;
}
.botbuttom {
	padding-inline: 30px;
	height: 32px;
	// &.submit {
	// 	position: absolute;
	// 	// bottom: 30px;
	// 	bottom: 50px;
	// 	left: 50%;
	// 	transform: translateX(-50%);
	// }
}
.submit-container {
	// width: 100%;
	width: calc(100% - 400px);
	height: 32px;
	position: absolute;
	bottom: 50px;
	background-color: #fff;
	z-index: 999;
	.submit {
		position: absolute;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
	}
}
.myupload {
	// display: inline-block;
	display: flex;
	margin-left: 20px;
}
.opration {
	display: flex;

}
.appendix {
	margin-top: 20px;
}
.lostRadio {
	margin-top: 7px;
		width: 100%;
	.el-radio {
		display: block;
		line-height: 30px;
		&:nth-last-of-type(1) {
			display: inline-block;
			width: 10%;
			margin-right: 0;
		}
	}
	::v-deep .el-input {
		display: inline-block;
		width: 90%;
	}
}
.losttable {
	// width: 1000px;
	margin-bottom: 20px;
}
.borderline {
	border-bottom: 1px solid #b1b1b1;
	padding-bottom: 20px;
}
.el-tabs{
	margin-bottom: -10px;
}
.dicttag {
	display: inline-block;
}


.app-container {
	// padding-top: 115px;
	padding-top: 90px;
	height: 100%;
  background-color: #fff;
	padding-inline: 200px;
	position: relative;
}
.aaa {
	padding-top: 2px;
	padding-inline: 0;

}
.devider {
	border-bottom: 1px solid #b1b1b1;
	position: absolute;
	top: 232px;
	left: 20px;
	right: 20px;
}
@import url("~@/assets/fonts/font.css");
.top-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1024;
  height: 82px;
  min-width: 1055px;
  background-color: #fff;
  box-shadow: 0 1px 4px rgb(214, 209, 209);
  display: flex;

  .top-bar-left {
    width: 563px;
    background-image: url("../assets/images/top_nav_left.png");
    // background-image: url("../../assets/images/top_nav_left1.png");
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    img {
      // width: 91px;
      height: auto;
      margin-left: 20px;
    }
  }
  .top-bar-middle {
    flex: 1;
    &>div:first-child {
      width: 100%;
      height: 20px;
      background-color: #007BFF;
      // background-color: #054c80;
    }
    &-title {
      position: relative;
      left: 10px;
      top: 15px;
      font-size: 28px;
      // color: #2A72EE;
      color: #2A72EE;
      letter-spacing: 1px;
      white-space: nowrap;
      font-family: 'YouSheBiaoTiHei';
    }
  }
}

.isEmpty {
	text-align: center;
	// line-height: 500px;
	margin-top: 300px;
	color: #666;
	// font-weight: bolder;
}
.moblie-app {
	padding-inline: 10px;
	padding-top: 50px;
	// width: 500px;
	overflow: auto;
	.el-tabs {
		position: fixed;
		background-color: #fff;
		top: 50px;
		z-index: 999;
		// width: 100%;
		width: calc(100% - 20px);
	}
	.moblie-title {
		background-color: #2A72EE;
		width: 100%;
		height: 50px;
		padding: 0 20px;
		display: flex;
		justify-content: center;
		align-items: center;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 999;

		img {
			// width: calc(100% - 20px);
			width: 90%;
			// margin: 0 auto;
			// height: 50px;
		}

	}
	.ttitle {
		font-size: 16px;
		line-height: 25px;
	}
	.content{
		position: relative;
		margin-top: 50px;
	}
	.info {
		margin-bottom: 5px;
	}
	.devider {
		top: 75px;
		left: 0;
		right: 0;
		// display: none;
	}
}
.submit-container {
	// width: 100%;
	width: calc(100% - 20px);
	height: 32px;
	position: relative;
	margin-top: 40px;
	bottom: 0;
	.submit {
		bottom: 0;
	}
}

</style>
